<link rel="stylesheet" href="<?=style_url('reminder');?>">
<div>
	<table cellpadding="0" cellspacing="2">
		<tr>
			<td class="title">
				<p style="font-size:20px; font-weight:bold;"><?=$school_name;?></p>
				<p style="font-size:12;"><?=$school_address;?></p>
			</td>
		</tr>
	</table>
</div>
<hr>
<div>
	<table cellpadding="0" cellspacing="0">
		<tr>
			<td colspan="2" rowspan="4" style="width:580;">
				<table cellpadding="0" cellspacing="0">
					<tr>
						<td valign="top" style="width:180;">
							<table cellpadding="0" cellspacing="2">
								<tr>
									<td style="font-size:10px;">BILL TO:</td>
								</tr>
								<tr>
									<td style="font-size:10px;">Mr & Mrs&nbsp;<?=ucwords($stud->lastname);?></td>
								</tr>
								<tr>
									<td style="font-size:10px;">C/O&nbsp;<?=ucwords($stud->fullname);?></td>
								</tr>
								<tr>
									<td style="font-size:10px;"><?=ucwords($stud->present_address);?></td>
								</tr>
								<tr>
									<td style="font-size:10px;"><?= ucwords($stud->level_desc.' - '.$stud->teacher_name)?></td>
								</tr>
							</table>
						</td>
						<td valign="top" align="center" style="width:400; text-align:center; font-size:20px; font-weight:bold;">R E M I N D E R</td>
					</tr>
				</table>
			</td>
			<td class="overline rightline leftline" style="width:100; background-color:#81817D; text-align:center;">DATE</td>
			<td class="overline rightline" style="width:100; background-color:#81817D; text-align:center;">STMT PRD</td>
		</tr>
		<tr>
			<td class="overline rightline leftline" style="width:100; text-align:center;">&nbsp;<?=$billings->date;?></td>
			<td class="overline rightline" style="width:100; text-align:center;">&nbsp;<?=$billings->stmt_period;?></td>
		</tr>
		<tr>
			<td class="overline rightline leftline" style="width:100; background-color:#81817D; text-align:center;">DUE DATE</td>
			<td class="overline rightline" style="width:100; background-color:#81817D; text-align:center;">BALANCE DUE</td>
		</tr>
		<tr>
			<td class="overline rightline leftline" style="width:100; text-align:center;">&nbsp;<?=$billings->due;?></td>
			<td class="overline rightline" style="width:100; text-align:center;">&nbsp;Php&nbsp;<?=number_format($billings->balance,2,'.',',');?></td>
		</tr>
		<tr>
			<td class="all_around" style="width:100; background-color:#81817D; text-align:center;">DATE</td>
			<td class="overline rightline underline" style="width:480; background-color:#81817D; text-align:center;">DESCRIPTION</td>
			<td class="overline rightline underline" style="width:100; background-color:#81817D; text-align:center;">AMOUNT</td>
			<td class="overline rightline underline" style="width:100; background-color:#81817D; text-align:center;">BALANCE</td>
		</tr>
		<?if($billings->items):?>
			<?foreach ($billings->items as $k => $v):?>
				<?
				$balance[0] = 0;
				$balance[$k+1] = $v->amount?>
				<tr >
					<td class="rightline underline leftline" style="border-bottom:none; text-align:center;"><?=$v->date;?></td>
					<td class="rightline underline" style="border-bottom:none; text-align:left;">&nbsp;<?=ucwords($v->description);?></td>
					<td class="rightline underline" style="border-bottom:none; text-align:right;"><?=number_format($v->amount,2,'.',',');?></td>
					<td class="rightline underline" style="border-bottom:none; text-align:right;"><?=number_format(array_sum($balance),2,'.',',');?></td>
				</tr>
			<?endforeach;?>
		<?endif;?>
		<tr>
			<td class="rightline underline leftline" style="height:100px; text-align:center;">&nbsp;</td>
			<td class="rightline underline" style="height:100px; text-align:left;">&nbsp;</td>
			<td class="rightline underline" style="height:100px; text-align:left;">&nbsp;</td>
			<td class="rightline underline" style="height:100px; text-align:left;">&nbsp;</td>
		</tr>
	</table>
	
	<table cellpadding="0" cellspacing="0" style="margin-top:4px;">
		<tr>
			<td class="all_around" style="width:180;" rowspan="2" valign="top" style="padding-left:10px; font-style:italic;">MESSAGE:<?=$billings->desc;?></td>
			<td class="overline rightline underline" style="width:100; background-color:#81817D; text-align:center;">CURRENT</td>
			<td class="overline rightline underline" style="width:100; background-color:#81817D; text-align:center;">1-30 DAYS</td>
			<td class="overline rightline underline" style="width:100; background-color:#81817D; text-align:center;">31-60 DAYS</td>
			<td class="overline rightline underline" style="width:100; background-color:#81817D; text-align:center;">61-90 DAYS</td>
			<td class="overline rightline underline" style="width:100; background-color:#81817D; text-align:center;">OVER 90 DAYS</td>
			<td class="overline rightline underline" style="width:100; background-color:#81817D; text-align:center;">BALANCE DUE</td>
		</tr>
		<tr>
			<td class="rightline underline">&nbsp;<?=number_format($billings->current,2,'.',',');?></td>
			<td class="rightline underline">&nbsp;<?=number_format($billings->thirty,2,'.',',');?></td>
			<td class="rightline underline">&nbsp;<?=number_format($billings->sixty,2,'.',',');?></td>
			<td class="rightline underline">&nbsp;<?=number_format($billings->ninety,2,'.',',');?></td>
			<td class="rightline underline">&nbsp;<?=number_format($billings->o_ninety,2,'.',',');?></td>
			<td class="rightline underline" style="text-align:right;">&nbsp;Php&nbsp;<?=number_format($billings->balance,2,'.',',');?></td>
		</tr>
	</table>
	<table cellpadding="0" cellspacing="2">
		<tr>
			<td style="font-size:8px;">NOTES:</td>
		</tr>
		<tr>
			<td style="font-size:8px;">1) PLEASE BRING THIS STATEMENT OF ACCOUNT WHEN PAYING YOUR BILLS. This document summarizes all transaction charges and its payments/credits as of date with its aging of the open billings;</td>
		</tr>
		<tr>
			<td style="font-size:8px;">2) Please remit your payment for the amount due or before due date. If incorrect, please advise us within five (5) business days from the date of receipt, otherwise, stated amount will be considered correct;</td>
		</tr>
		<tr>
			<td style="font-size:8px;">3) Disregard, If payment has been remitted. Past due billings are due and demandable. Late payment of tuition fee will be assessed 5% surcharge;</td>
		</tr>
		<tr>
			<td style="font-size:8px;">4) Pay in cash or in check payable to SMALL WORLD CHRISTIAN SCHOOL FOUNDATION, INC. When paying in check, please issue one check per student to ensure proper posting.</td>
		</tr>
	</table>
	
	<table cellpadding="0" cellspacing="2">
		<tr>
			<td style="border-bottom:#000 1px dashed;">&nbsp;</td>
		</tr>
	</table>
	<table cellpadding="0" cellspacing="2">
		<tr>
			<td style="font-size:16px; font-weight:bold;"><?=$school_name;?></td>
		</tr>
	</table>
	<br>
	<table cellpadding="0" cellspacing="2">
		<tr>
			<td valign="top" style="font-size:20px; font-weight:bold;">PAYMENT SLIP</td>
			<td valign="top">
				<table cellpadding="0" cellspacing="2">
					<tr>
						<td style="font-size:10px;">Mr & Mrs&nbsp;<?=ucwords($stud->lastname);?></td>
					</tr>
					<tr>
						<td style="font-size:10px;">C/O&nbsp;<?=ucwords($stud->fullname);?></td>
					</tr>
					<tr>
						<td style="font-size:10px;"><?=ucwords($stud->present_address);?></td>
					</tr>
					<tr>
						<td style="font-size:10px;"><?= ucwords($stud->level_desc.' - '.$stud->teacher_name)?></td>
					</tr>
				</table>
			</td>
			<td valign="top" align="right">
				<table cellpadding="4" cellspacing="0">
					<tr>
						<td class="all_around" style="padding:2 10px; background-color:#81817D; width:100px;">Balance Due</td>
						<td class="overline rightline underline" style="width:100px; text-align:right; padding:2 10px;">&nbsp;Php&nbsp;<?=number_format($billings->balance,2,'.',',');?></td>
					</tr>
					<tr>
						<td class="rightline underline leftline" style="padding:2 10px; background-color:#81817D;">Amount Paid</td>
						<td class="rightline underline" style="text-align:right; padding:2 10px;">&nbsp;</td>
					</tr>
					<tr>
						<td class="rightline underline leftline" style="padding:2 10px; background-color:#81817D;">Ref. #</td>
						<td class="rightline underline" style="text-align:right; padding:2 10px;">&nbsp;</td>
					</tr>
				</table>
			</td>
		</tr>
	</table>

</div>